package net.shopxx.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "bmw_task_record")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "bmw_task_record_sequence")
public class TaskRecord extends BaseEntity{

	private static final long serialVersionUID = -3774987908045019725L;
	
	/**
	 * 订单状态
	 */
	public enum RecordStatus {

		proceeding(0),
		
		overtime(1);
		 
	    private int value;
	 
	    private RecordStatus(int num) {
	        this.value = num;
	    }
	 
	    public int toValue() {
	        return value;
	    }
	}
	
	/** 记录状态 */
	private RecordStatus status;
	
	/** 接受任务时间 */
	private Date acceptTime;
	
	/** 对应的任务 */
	private Task task;

	public RecordStatus getStatus() {
		return status;
	}

	public void setStatus(RecordStatus status) {
		this.status = status;
	}

	public Date getAcceptTime() {
		return acceptTime;
	}

	public void setAcceptTime(Date acceptTime) {
		this.acceptTime = acceptTime;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tasks")
	public Task getTask() {
		return task;
	}

	public void setTask(Task task) {
		this.task = task;
	}
	
	
}
